#include <stdio.h>
#include <conio.h>

void sum(int *x,int *y);
void min(int *x ,int *y);
void mul(int *x ,int *y);
void div(int *x ,int *y);

int main(void) {
	
	int x , y ;
	char opr , ans ;
	
	startover :
		printf("enter ur statement : \n ");
		scanf("%d %c %d", &x , &opr , &y);
		
		switch ( opr ) {
			case '+' :
				sum(&x,&y);
			//	printf("%d", sum);
				break;
			case '-' :
				min( &x , &y);
				break;
			case '*' :
				mul( &x , &y);
				break;
			case '/' :
				div( &x , &y);
				break;
			default :
				printf("the operator is unknown\n");
				break;
		}
		
	printf("\nwould u like to startover ? Y/N \n");
	scanf(" %c", &ans);
	
	if ( ans == 'Y' || ans == 'y')
	goto startover;
	
	getchar();
	return 0;
}

void sum(int *x,int *y) {
	int sum ;
	sum = *x + *y ;
	//return sum ;
    printf("%d", sum);
}

void min(int *x ,int *y) {
	int min ;
	min = x - y ;
	printf("%d", min);
}

void mul(int *x ,int *y) {
	int mul ;
	mul = *x * *y ;
	printf("%d", mul);
}

void div(int *x ,int *y) {
	float div ;
	if ( *y == 0) {
		printf("thats cant happen\n");
	} else {
		div = (float) *x / *y ;
	printf("%.2f", div);
		
	}
	
}


